package com.estate.business.impl;

import com.estate.business.LoginService;
import com.estate.dao.UserInfoDao;
import com.estate.utils.EncodeUtil;
import com.estate.vo.impl.UserInfoVo;

public class LoginServiceImpl implements LoginService {
	
	private UserInfoDao userInfoDao;
	
	public UserInfoVo validate(UserInfoVo user) {
		user.setPassword(EncodeUtil.getMD5Code(user.getPassword()));
		UserInfoVo userInfo = (UserInfoVo)userInfoDao.validate(user);
//		System.out.println(userInfo == null);
		return userInfo;
	}

	public UserInfoDao getUserInfoDao() {
		return userInfoDao;
	}

	public void setUserInfoDao(UserInfoDao userInfoDao) {
		this.userInfoDao = userInfoDao;
	}
}
